package com.turing.common.entity;

import com.alibaba.fastjson.JSONArray;
import lombok.Data;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

@Data
public class TextVO implements Serializable {

    private int pageNo;

    private String docID;

    private Map<String, Line> contIndex;

    private List<Paragraph> paragraphs;

    private int pageStartIndex;

    private int pageEndIndex;

    @Data
    public static class Line implements Serializable {

        private int lineNo;

        private String lineId;

        private String objType;

        private String objContent;

        private JSONArray objPos;

        private int lineStartIndex;

        private int lineEndIndex;

        private List<Cell> cells;

    }

    @Data
    public static class Cell implements Serializable {

        private Boolean merge;

        private Integer column;

        private String objContent;

        private MergeInfo mergeInfo;

    }

    @Data
    public static class MergeInfo implements Serializable {

        private Integer firstLine;

        private Integer lastLine;

        private Integer firstColumn;

        private Integer lastColumn;

    }

    @Data
    public static class Paragraph implements Serializable {

        private String paraId;

        private String paraNo;

        private List<Line> lines;

    }
}
